/*INSERTION_TRADOIL*/
/**********************************************************************************************************************/
/* !Layer           : MCAL                                                                                            */
/* !Component       : PWD                                                                                             */
/* !Description     : Code For PWD Component                                                                          */
/*                                                                                                                    */
/* !File            : PWD_DEF_H.tpl                                                                                   */
/* !Description     : Configuration files                                                                             */
/*                                                                                                                    */
/* !Reference       :                                                                                                 */
/*                                                                                                                    */
/* Coding language  : OIL                                                                                             */
/*                                                                                                                    */
/* COPYRIGHT VALEO all rights reserved                                                                                */
/**********************************************************************************************************************/
/* Dimension Informations
 * %PCMS_HEADER_SUBSTITUTION_START:%
 * The PID has this format: <Product ID>:<Item ID>.<Variant>-<Item Type>;<Revision>
 * %PID:%
 * %PCMS_HEADER_SUBSTITUTION_END:%
 **********************************************************************************************************************/
'/**********************************************************************************************************************/
/* !Layer           : MCAL                                                                                            */
/* !Component       : PWD                                                                                             */
/* !Description     : Code For PWD Component                                                                          */
/*                                                                                                                    */
/* !File            : PWD_DEF.h                                                                                       */
/* !Description     : This file contains the header of definitions of PWD component test variables.                   */
/*                                                                                                                    */
/* !Reference       :                                                                                                 */
/*                                                                                                                    */
/* Coding language  : C                                                                                               */
/*                                                                                                                    */
/* COPYRIGHT VALEO all rights reserved                                                                                */
/**********************************************************************************************************************/
/** `Date()': generated by Genecode `Version()'                                                      */
/**********************************************************************************************************************/

#ifndef PWD_DEF_H
#define PWD_DEF_H

#include "Std_Types.h"

/**********************************************************************************************************************/
/* DEFINES                                                                                                            */
/**********************************************************************************************************************/


`PWD_CHANNEL AS FunctionalName
{
   '#define `FunctionalName'
#define PWD_PERIOD_DESIRED_MAX_`FunctionalName' `FunctionalName.MAX_PERIOD_DECIMAL_VALUE'
#define PWD_ACTIVE_STATE_`FunctionalName' `FunctionalName.ACTIVE_STATE'
#define PWD_TIMEOUT_PARAM_RESOL_IN_NS_`FunctionalName' `FunctionalName.TIMEOUT_PARAM_RESOL_IN_NS'
#define PWD_SAMPLING_RATE_NS_`FunctionalName' `FunctionalName.SAMPLING_RATE_ATTRIBUT_NS'
#define PWD_PERIOD_AT_TIMEOUT_`FunctionalName' `FunctionalName.PERIOD_AT_TIMEOUT'
#define PWD_PERIOD_TO_FREQ_`FunctionalName' `1000000000 / FunctionalName.DESIRED_PERIOD_RESOL_IN_NS'
`}
'

#define PWD_START_SEC_VAR_UNSPECIFIED
#include "PWD_MemMap.h" 

extern boolean PWD_bEnableAll;
extern uint16  PWD_u16UpdateDisable;
`
PWD_CHANNEL AS FunctionalName CONCATE
{
   WHERE (FunctionalName == "")
   {
'
extern boolean PWD_bEna_`FunctionalName';
extern uint32  PWD_udtPer_`FunctionalName';
extern uint32  PWD_udtActiveDuration_`FunctionalName';
extern uint16  PWD_udtDuty_`FunctionalName';
extern uint32  PWD_udtTout_`FunctionalName';
extern Std_ReturnType PWD_udtToutSt_`FunctionalName';
  `}
   WHERE (FunctionalName != "")
   {
'
extern boolean PWD_bEna_`FunctionalName';
extern uint32  PWD_udtPer_`FunctionalName';
extern uint32  PWD_udtFreq_`FunctionalName';
extern uint32  PWD_udtActiveDuration_`FunctionalName';
extern uint16  PWD_udtDuty_`FunctionalName';
extern uint32  PWD_udtToutRloadVal_`FunctionalName';
extern boolean PWD_bFirstPerOccured_`FunctionalName';
extern boolean PWD_bCurrentLvlIsActive_`FunctionalName';
extern uint32  PWD_udtTout_`FunctionalName';
extern uint32  PWD_udtTout_Desired_`FunctionalName';

extern uint32  TEST_DUTY_`FunctionalName';
extern uint32  TEST_PERIOD_`FunctionalName';

extern Std_ReturnType PWD_udtToutSt_`FunctionalName';
  `}
}'
#define PWD_STOP_SEC_VAR_UNSPECIFIED
#include "PWD_MemMap.h" 

#define PWD_START_SEC_CALIB_UNSPECIFIED
#include "PWD_MemMap.h" 

`
PWD_CHANNEL AS FunctionalName CONCATE
{
   WHERE (FunctionalName == "")
   {
'extern const uint32  PWD_kudtTout_`FunctionalName' ;
`  }
   WHERE (FunctionalName != "")
   {
'extern const uint32  PWD_kudtTout_`FunctionalName';
`  }
}'
#define PWD_STOP_SEC_CALIB_UNSPECIFIED
#include "PWD_MemMap.h" 

#define PWD_START_SEC_CODE
#include "PWD_MemMap.h"

/******************************************************************************/
/* MACRO FUNCTIONS                                                            */
/******************************************************************************/

/***************************************************************************************/
/* !FuncName    : PWD_vidEntry_2500us()                                            */
/* !Description : Macro to periodecally check signals meagurements                     */
/*                                                                                     */
/* !LastAuthor  : A. Elkhazragy                                                        */
/***************************************************************************************/

#define PWD_vidEntry_2500us() \
do \
{ \
`
    .PWD_CHANNEL AS Channel_others
   {
   '   PWD_vidMainFunction(`Channel_others'); \`
   }
'} \
while (0)


/***************************************************************************************/
/* !FuncName    : PWD_vidTimeoutManager()                                          */
/* !Description :                                                                      */
/*                                                                                     */
/* !LastAuthor  : A. Elkhazragy                                                        */
/***************************************************************************************/



#define PWD_vidTimeoutManager() \
do \
{ \
`
    .PWD_CHANNEL AS Channel_others
   {
   '   PWD_udtWriteTimeoutValue(`Channel_others', PWD_udtTout_Desired_`Channel_others'); \`
   }
'} \
while (0)



#define PWD_STOP_SEC_CODE
#include "PWD_MemMap.h" 

#endif /* PWD_DEF_H  */

/*---------------------------------------------------- end of file ---------------------------------------------------*/
